package com.services;

import com.model.FlightModel;
import com.model.PageBeanMode;

import java.util.List;
import java.util.Map;

/**
 * @Program: exam
 * @ClassName: IFlightServices
 * @Description:
 * @Author: li
 * @Create: 2019-07-24 13:49
 */
public interface IFlightServices {
    /**
     * @Description: 将航班进行排序
     * @Author: li
     * @Create: 2019/7/24-13:50
     * @param status 1:按租金升序，0:按航班排序,-1:按租金降序
     * @Return java.util.List<com.li.domain.UserModel>
     */
    List<FlightModel> sortFlights(int status);

    /**
     * @Description: 根据航班模糊查询
     * @Author: li
     * @Create: 2019/7/24-14:18
     * @param name
     * @Return java.util.List<com.li.domain.FlightModel>
     */
    List<FlightModel> fuzzyQueryByFlight(String name);

    /**
     * @Description: 根据航班id 返回 Flight
     * @Author: li
     * @Create: 2019/7/24-15:47
     * @param id
     * @Return com.li.domain.FlightModel
     */
    FlightModel queryFlightById(int id);

    /**
     * @Description: 分页返回Flight
     * @Author: li
     * @Create: 2019/7/24-20:01
     * @param pageStart
     * @param pageSize
     * @param map
     * @Return com.li.domain.PageBeanMode<com.li.domain.FlightModel>
     */
    PageBeanMode<FlightModel> pageFlight(String pageStart, String pageSize, Map<String, String[]> map);

    /**
     * @Description: 下架
     * @Author: li
     * @Create: 2019/7/24-20:57
     * @param fid
     * @Return void
     */
    void changFlightDown(int fid);

    /**
     * @Description: 添加新购票
     * @Author: li
     * @Create: 2019/7/24-21:24
     * @param flightModel
     * @Return void
     */
    void addFlight(FlightModel flightModel);

    /**
     * @Description: 更新新购票
     * @Author: li
     * @Create: 2019/7/24-21:24
     * @param flightModel
     * @Return void
     */
    void updateFlight(FlightModel flightModel);

    /**
     * @Description: 更改航班状态
     * @Author: li
     * @Create: 2019/7/24-16:22
     * @param id
     * @param status
     * @Return void
     */
    void changeFlightStatus(int id , int status);

    /**
     * @Description: 返回所有的航班信息
     * @Author: li
     * @Return java.util.List<com.li.domain.FlightModel>
     */
    List<FlightModel> queryAllFlight();
}
